#!/bin/bash
echo " "
echo "=============================================="
echo "method "$3" for matrix "$1" with ILU level "$2" and nvectors "$4
echo "=============================================="
echo " "
valgrind --log-file=valgrind.txt ./ilu --method $3 --file $1 --tolerance 1.e-10 --ilu-level $2 --nvectors $4 
VALGRIND=$(tail -6 valgrind.txt | head -n 1)
echo $VALGRIND"method "$3" for matrix "$1" with ILU level "$2" and nvectors "$4 >> memory.txt
